package com.liuyucheng.designpattern.装饰者模式;

/**
 * @author LiuYuCheng
 * @date 2023年06月27日 15:08
 */
public class DecoratorPattern {
    public static void main(String[] args) {
        Component p = new ConcreteComponent();
        p.operation();
        System.out.println("---------------------------------");
        Component d = new ConcreteDecorator(p);
        d.operation();
        Component d2 = new ConcreteDecorator2(p);
        d2.operation();
    }
}

